﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ComponentQuery.aspx.cs" Inherits="WXYW.ComponentQuery" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
元器件查询
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
 <table width="100%" cellpadding="0px" cellspacing="0px" border="0px" style="line-height: 30px">
        <tr>
            <td>
                关键字：
            </td>
            <td>
                <asp:TextBox ID="keywordTxtBox" runat="server" Width="150px"></asp:TextBox>
            </td>          
            <td>
                储存地：
            </td>
            <td>
                <asp:DropDownList ID="platformDropdownList" runat="server" Width="150px">
                </asp:DropDownList>
            </td>
            <td>
                <asp:Button ID="searchButton" runat="server" Text="查询" Width="80px" OnClick="searchButton_Click" />
            </td>
        </tr>
    </table>
    <asp:GridView ID="AccessoryListGridView" runat="server" CssClass="tableList" Width="100%"
        AutoGenerateColumns="False" PageSize="20" AllowPaging="true" 
        OnRowDataBound="AccessoryListGridView_RowDataBound" OnPageIndexChanging="AccessoryListGridView_PageIndexChanging">
        <Columns>
             <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="物料号" DataField="MaterialNO" >
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField HeaderText="原料型号" DataField="ModelNO" >
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField HeaderText="原料分类" DataField="Class" >
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:BoundField>
             <asp:TemplateField HeaderText="原料描述">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Description") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="Label1" runat="server" CssClass="NOBorderTxtBox" TextMode="MultiLine"
                        Rows="1" Text='<%# Bind("Description") %>' ReadOnly="true" Width="130px"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" Width="130px" />
            </asp:TemplateField>
            <asp:BoundField HeaderText="收费价格" DataField="Price" >
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="Station" HeaderText="储存地">
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField HeaderText="原料数量" DataField="Count" >
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField HeaderText="库存金额" DataField="StockPriceSum" >
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField HeaderText="使用数量" DataField="UseTimes" >
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField HeaderText="消耗金额" DataField="ConsumedPriceSum" >
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="消耗平台" Visible='True'>
                <ItemTemplate>
                    <asp:TextBox ID="Label_xhpt" runat="server" CssClass="NOBorderTxtBox" TextMode="MultiLine"
                        Rows="1" Text='<%# Bind("ConsumedStation") %>' ReadOnly="true"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False"/>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="消耗维修单号" Visible='True'>
                <ItemTemplate>
                    <asp:TextBox ID="Label_xhRMA" runat="server" CssClass="NOBorderTxtBox" TextMode="MultiLine"
                        Rows="1" Text='<%# Bind("ConsumedRMAID") %>' ReadOnly="true"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False"/>
            </asp:TemplateField>
        </Columns>
        <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Wrap="False" />
        <PagerTemplate>
            本类记录<span style="color: Red"><%= RecordsNumber%></span>条, <span style="color: Red">20</span>条/页
            当前 <span style="color: Red">
                <%= AccessoryListGridView.PageIndex + 1%>/<%= AccessoryListGridView.PageCount%></span>页
            <asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server"
                Style="color: blue">首页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Prev"
                    ID="LinkButton2" runat="server" Style="color: blue">|上一页</asp:LinkButton>
            <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server"
                Style="color: blue">下一页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Last"
                    ID="LinkButton4" runat="server" Style="color: blue">|尾页</asp:LinkButton>
            转到<asp:DropDownList ID="pageDDL" runat="server" AutoPostBack="True" OnSelectedIndexChanged="pageDDL_SelectedIndexChanged">
            </asp:DropDownList>
        </PagerTemplate>
        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#A55129"></HeaderStyle>
    </asp:GridView>
</asp:Content>
